package com.adnaan.backend.service;

import com.adnaan.backend.entity.Article;
import com.adnaan.backend.entity.UserCollect;
import com.adnaan.backend.entity.UserComment;
import com.adnaan.backend.entity.ViewHistory;
import com.adnaan.backend.entity.dto.OptionDto;
import com.adnaan.backend.entity.vo.ViewHistoryVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface ArticleService extends IService<Article> {
    List<OptionDto> getTags(Long id);

    void deleteTags(Long id);

    void insertTags(Long id, List<String> tagIds);

    boolean readHistory(ViewHistoryVo viewHistoryVo);

    void likeArticle(Long userId, Long articleId);

    boolean isArticleLiked(Long userId, Long articleId);

    void collectArticle(Long userId, Long articleId);

    boolean isArticleCollected(Long userId, Long articleId);

    void addComment(Long userId, Long articleId, String commentContent);

    List<UserComment> getCommentsByArticleId(Long articleId);

    Integer getLikeCount(Long id);

    long collectCount(Long userId);

    List<UserCollect> collectPage(Page<UserCollect> page, Long userId);

    Map<String, String> getContent(Long articleId);

    Map<String, Long> statistics(Long userId);

    long viewHistoryCount(Long userId);

    List<ViewHistory> viewHistoryPage(Page<ViewHistory> page, Long userId);

    boolean clearViewHistory(Long userId);

    void increasePageView(Long id);

    List<Long> getArticleIdsByTagIds(String tagIds);

    Integer getCollectCount(Long id);

    Integer getProcess(Long id);
}
